package com.andy.buyu.server.dto;

import com.andy.buyu.server.game.GameUser;

import io.netty.buffer.ByteBuf;

/**
 * 聊天
 * @author cuiwm
 */
public class ChatMessage extends BaseMessage{
	
    private GameUser user;
    private String msg;
    
    public ChatMessage(GameUser user,String msg) {
    	this.user = user;
    	this.msg = msg;
	}

	@Override
	public void writeBody(ByteBuf buf) {
		writeString(buf, user.getId().toString());
		writeString(buf, msg);
	}


}